<template>
  <div>
    <h2>Home</h2>
    {{ $route.query }}
    <hr>
    {{ route.query }}

  </div>
</template>
<script setup>
import { useRoute, onBeforeRouteLeave, onBeforeRouteUpdate } from 'vue-router';
const route = useRoute();
onBeforeRouteUpdate((to, from, next) => {
  console.log('onBeforeRouteUpdate');
  next();
})
onBeforeRouteLeave((to, from, next) => {
  console.log('onBeforeRouteLeave');
  next();
})


</script>